package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the forms_details database table.
 * 
 */
@Entity
@Table(name="forms_details")
@NamedQuery(name="FormsDetail.findAll", query="SELECT f FROM FormsDetail f")
public class FormsDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="fordetails_id")
	private int fordetailsId;

	@Column(name="for_guset")
	private int forGuset;

	@Column(name="fordetails_browse")
	private int fordetailsBrowse;

	@Column(name="fordetails_change")
	private int fordetailsChange;

	@Column(name="fordetails_url")
	private String fordetailsUrl;

	@Column(name="form_name")
	private String formName;

	//bi-directional many-to-one association to Colle
	@OneToMany(mappedBy="formsDetail")
	private List<Colle> colles;

	//bi-directional many-to-one association to Form
	@ManyToOne
	@JoinColumn(name="for_id")
	private Form form;

	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="use_id")
	private User user;

	public FormsDetail() {
	}

	public int getFordetailsId() {
		return this.fordetailsId;
	}

	public void setFordetailsId(int fordetailsId) {
		this.fordetailsId = fordetailsId;
	}

	public int getForGuset() {
		return this.forGuset;
	}

	public void setForGuset(int forGuset) {
		this.forGuset = forGuset;
	}

	public int getFordetailsBrowse() {
		return this.fordetailsBrowse;
	}

	public void setFordetailsBrowse(int fordetailsBrowse) {
		this.fordetailsBrowse = fordetailsBrowse;
	}

	public int getFordetailsChange() {
		return this.fordetailsChange;
	}

	public void setFordetailsChange(int fordetailsChange) {
		this.fordetailsChange = fordetailsChange;
	}

	public String getFordetailsUrl() {
		return this.fordetailsUrl;
	}

	public void setFordetailsUrl(String fordetailsUrl) {
		this.fordetailsUrl = fordetailsUrl;
	}

	public String getFormName() {
		return this.formName;
	}

	public void setFormName(String formName) {
		this.formName = formName;
	}

	public List<Colle> getColles() {
		return this.colles;
	}

	public void setColles(List<Colle> colles) {
		this.colles = colles;
	}

	public Colle addColle(Colle colle) {
		getColles().add(colle);
		colle.setFormsDetail(this);

		return colle;
	}

	public Colle removeColle(Colle colle) {
		getColles().remove(colle);
		colle.setFormsDetail(null);

		return colle;
	}

	public Form getForm() {
		return this.form;
	}

	public void setForm(Form form) {
		this.form = form;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}